<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/tiles2/common.jsp" %>
<% request.setCharacterEncoding("UTF-8"); %>
<div class="aboutus" id="aboutus4" >
	<h3>회원 탈퇴</h3>
	<div>
		<form id="joinoutfrm" class="well form-horizontal">
			<fieldset>
				<div class="control-group info">
				<label class="control-label" for="uid">아이디</label>
				<div class="controls">
					<input type="text" name="uid" id="uid"
					class="span3"  maxlength="16">
				</div> 
				</div><!-- 아이디 -->
				<div class="control-group info">
					<label class="control-label" for="pwd">비밀번호</label>
					<div class="controls">
						<input type="password" name="pwd" id="pwd"
						class="span3"  maxlength="16">
					</div> 
				</div><!-- 비밀번호 -->
				<div class="control-group info">
					<label class="control-label" for="repwd">비밀번호 확인</label>
					<div class="controls">
						<input type="password" name="repwd" id="repwd"
						class="span3"  maxlength="16">
						<span id="msg2">이전 항목에서 입력했던 비밀번호를 한번 더 입력하세요.</span></div> 
				</div><!-- 비밀번호 확인 -->
			</fieldset>
			<div class="tcenter">
				<a class="btn btn-primary" id="savebtn">
					<i class="icon-ok icon-white"></i>&nbsp;탈퇴하기
				</a>
				<a class="btn btn-danger" id="cancelbtn">
					<i class="icon-remove icon-white"></i>&nbsp;취소하기
				</a>
			</div>
		</form>
	</div><!-- 회원가입 -->
	<input type="hidden" id="pwdcheck" value="n">
</div>
<script>
	$("#savebtn").on("click",function(event){
			if($("#uid").val()=="")alert();
			else if($("#pwd").val()=="")alert();
			else if($("#pwdcheck").val()=="n")
				alert("비밀번호가 일치하지 않습니다.");
			else{
				 $("#joinoutfrm").attr("method","post");
				 $("#joinoutfrm").submit();
			 }
		});
	$("#cancelbtn").on("click",function(event){
		$(location).attr("href","<c:url value='/index.mvc'/>");
	});
</script><!--이메일 선택-->

<script>
	$("#repwd").on("blur",function(event){
		if($("#pwd").val() == $("#repwd").val()){
			$("#msg2").html("비밀번호가 일치합니다").css("color","blue");
			$("#pwdcheck").val("y");
		}else {
			$("#msg2").html("비밀번호가 일치하지 않습니다.").css("color","red");
			$("#pwdcheck").val("n");
		}
	});
</script>







